package com.ds.infrastructure.hyperspace.common.admin;

import lombok.Getter;
import lombok.Setter;

/**
 * @author  Weishaoying
 * @date 2019/6/24 上午11:35
 */
@Setter
@Getter
public class AdminResponseVO {

    private Integer code = 0;

    private String msg;

    public static AdminResponseVO OK = new AdminResponseVO("ok");

    public AdminResponseVO() {}

    public AdminResponseVO(String msg) {
        this.msg = msg;
    }

    public AdminResponseVO(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static AdminResponseVO error(String msg) {
        return new AdminResponseVO(1, msg);
    }
}
